<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:fragment="head(title)">
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <!-- Bootstrap CSS -->
    <!--link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"-->
    <!-- Font Awesome CDN -->
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.13.0/css/all.css" integrity="sha384-Bfad6CLCknfcloXFOyFnlgtENryhrpZCe29RTifKEixXQZ38WheV+i/6YWSzkz3V" crossorigin="anonymous">
    <!-- Semantic CSS -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.css" >
    <!-- mark down -->
    <link rel="stylesheet" href="../../static/lib/editormd/css/editormd.min.css" th:href="@{/lib/editormd/css/editormd.min.css}">
    <!-- typo -->
    <link rel="stylesheet" href="../static/css/typo.css" th:href="@{/css/typo.css}">
    <!-- prism -->
    <link rel="stylesheet" href="../static/lib/prism/prism.css" th:href="@{/lib/prism/prism.css}">
    <!-- Customize CSS -->
    <link rel="stylesheet" href="../static/css/me.css" th:href="@{/css/me.css}">
    <!--title-->
    <title th:replace="${title}">fragments</title>
</head>

<body>
    <!-- Nav bar-->
    <nav th:fragment="menu(n)" class="ui attached inverted segment m-padded-tb-mini m-shadow-small">
        <div class="ui container">
            <div class="ui inverted secondary stackable menu m-opacity-mini">
                <h2 class="ui header item"><span class="m-poolside">Shell845</span></h2>
                <a href="#" th:href="@{/}" class="m-item item m-mobile-hide" th:classappend="${n==1} ? 'active'"><span class="m-daffodil"><i class="fas fa-home"></i> Home</span></a>
                <a href="#" th:href="@{/types/-1}" class="m-item item m-mobile-hide" th:classappend="${n==2} ? 'active'"><span class="m-daffodil"><i class="fas fa-bookmark"></i> Categories</span></a>
                <a href="#" th:href="@{/tags/-1}" class="m-item item m-mobile-hide" th:classappend="${n==3} ? 'active'"><span class="m-daffodil"><i class="fas fa-tag"></i> Tags</span></a>
                <a href="#" th:href="@{/history}" class="m-item item m-mobile-hide" th:classappend="${n==4} ? 'active'"><span class="m-daffodil"><i class="fas fa-history"></i> History</span></a>
                <div class="m-item right item m-mobile-hide">
                    <form name="search" action="#" method="post" th:action="@{/search}">
                        <div class="ui icon inverted input">
                            <input type="text" name="query" placeholder="Search..." th:value="${query}">
                            <i onclick="document.forms['search'].submit()" class="search link icon"></i>
                        </div>
                    </form>
                </div>
            </div>
        </div>
        <a href="#" class="ui menu toggle icon inverted m-top-right button m-mobile-display m-opacity-small">
            <i class="fas fa-bars m-poolside"></i>
        </a>
    </nav>

    <!--footer-->
    <footer th:fragment="footer" class="ui inverted vertical segment m-padded-tb-mid m-opacity-mini">
        <div class="ui center aligned container">
            <h5 class="ui inverted header m-text-spaced m-opacity-mid"><span style="color: #6BB6A1"><i class="envelope icon"></i><span th:text="#{index.email}">email</span></span></h5>
            <small class="m-text-spaced m-opacity-big"><span style="color: #6BB6A1">Copyright &copy; shell845</span></small>
        </div>
    </footer>

    <!-- JavaScript -->
    <th:block th:fragment="script">
        <!-- jQuery first, then Popper.js, then Bootstrap JS -->
        <script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js" crossorigin="anonymous"></script>
        <script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js" crossorigin="anonymous"></script>
        <script src="//cdn.jsdelivr.net/npm/jquery.scrollto@2.1.2/jquery.scrollTo.min.js"></script>
        <!-- prism -->
        <script src="../static/lib/prism/prism.js" th:src="@{/lib/prism/prism.js}"></script>
        <!-- customize -->
        <script>
            $('.menu.toggle').click(function () {
                $('.m-item').toggleClass('m-mobile-hide');
            });

            $('.ui.dropdown').dropdown({
                on : 'hover'
            });

            $('#sponsorButton').popup({
                popup: $('.sponsorPopup.popup'),
                on: 'click',
                position: 'bottom center'
            });
        </script>
    </th:block>
</body>
</html>